package net.sareweb.acab.session;

import net.sareweb.acab.entity.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("suggestioninfoList")
public class SuggestioninfoList extends EntityQuery<Suggestioninfo> {

	private static final String EJBQL = "select suggestioninfo from Suggestioninfo suggestioninfo";

	private static final String[] RESTRICTIONS = {
			"lower(suggestioninfo.infoMsg) like lower(concat(#{suggestioninfoList.suggestioninfo.infoMsg},'%'))",
			"lower(suggestioninfo.quality) like lower(concat(#{suggestioninfoList.suggestioninfo.quality},'%'))", };

	private Suggestioninfo suggestioninfo = new Suggestioninfo();

	public SuggestioninfoList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Suggestioninfo getSuggestioninfo() {
		return suggestioninfo;
	}
}
